# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>

pkgname=dateutils
pkgver=0.4.10
pkgrel=1
pkgdesc='nifty command line date and time utilities; fast date calculations and conversion in the shell'
url='https://www.fresse.org/dateutils/'
arch=('loong64' 'x86_64')
license=('BSD')
depends=('glibc')
source=("$pkgname-$pkgver.tar.xz::https://github.com/hroptatyr/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz"
        "$pkgname-$pkgver.tar.asc::https://github.com/hroptatyr/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.asc")
validpgpkeys=('6CB0D61E23A4275CC2CFA16194C9A1AC82C9390E')
sha512sums=('04a9fff177596bb9bc47d3b221865bbeafeafbc708385610845a1cdcb2a7fa379e8d9363cce578836ae121dab7ee64e19f61d82e8f222250e52d23c5f43cf521'
            'SKIP')

build() {
    cd $pkgname-$pkgver
    ./configure --prefix=/usr --with-old-links=no
    make
}

check() {
    cd $pkgname-$pkgver
    make check
}

package() {
    cd $pkgname-$pkgver
    make DESTDIR="$pkgdir" install
    install -Dm0644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
